import { lazy } from 'react'

const RegisterCode = lazy(() => import('../pages/Register/RegisterCode'))
const RegisterPhone = lazy(() => import('../pages/Register/RegisterPhone'))
const RegisterPassword = lazy(() => import('../pages/Register/RegisterPassword'))
const LoginCode = lazy(() => import('../pages/Login/LoginCode'))
const LoginPassword = lazy(() => import('../pages/Login/LoginPassword'))
const CountryPicker = lazy(() => import('../components/CountryPicker'))
const Home = lazy(() => import('../pages/Home'))

let routes = [
  {
    path: '/',
    component: Home,
  },
  {
    path: '/register/code',
    component: RegisterCode,
  },
  {
    path: '/register/phone',
    component: RegisterPhone,
  },
  {
    path: '/register/password',
    component: RegisterPassword,
  },
  {
    path: '/login/code',
    component: LoginCode,
  },
  {
    path: '/login/password',
    component: LoginPassword,
  },
  {
    path: '/countryPicker/:path?',
    component: CountryPicker,
  },
]

export default routes
